﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Vision;

// 圆查找

namespace Vision.src
{
    // 定义事件参数
    public class CircleFindEventArgs : EventArgs
    {
        public float CenterX { get; }
        public float CenterY { get; }

        public CircleFindEventArgs(float centerX, float centerY)
        {
            CenterX = centerX;
            CenterY = centerY;
        }
    }

    // 定义委托
    public delegate void CircleFindEventHandler(CircleFind circlefind, CircleFindEventArgs e);

    public class CircleFind
    {
        private CircleFindEventHandler circleFindEventHandler;

        public event CircleFindEventHandler Order
        {
            add
            {
                this.circleFindEventHandler += value;
            }
            remove
            {
                this.circleFindEventHandler -= value;
            }
        }

        public void ReturnResult(CircleFindEventArgs e)
        {
            this.circleFindEventHandler?.Invoke(this, e);
        }
    }
}
